import time

import pytest, yagmail, logging


def log():
    t = time.strftime('%Y%m%d%H%M%S', time.localtime())
    tt = 'zk' + t + '.png'
    logging.basicConfig(filename='log.log',
                        filemode='w+',
                        format='(asctime)s--(leveltime)s',
                        level=logging.DEBUG
                        )

    return tt


def fasong(aa):
    r = yagmail.SMTP(user='2796502172@qq.com', password='', host='smtp.qq.com')
    r.send(to='2796502172@qq.com', subject='11.4三周考', contents='请查收', attachments=aa)
